package com.tensquare.friend.client;

import entity.Result;
import entity.StatusCode;
import org.springframework.stereotype.Component;

/**
 * @Author:zimmor
 * @Date: 2021/3/16 16:40
 * @Description user微服务的熔断器
 * @version: 1.0.0
 */
@Component
public class FriendHystrix implements UserClient{
    @Override
    public Result attention(String friendid) {
        System.out.println("熔断器启动");
        return new Result(false, StatusCode.REMOTEERROR, "熔断器启动");
    }

    @Override
    public Result cancleAttention(String friendid) {
        System.out.println("熔断了");
        return new Result(false, StatusCode.REMOTEERROR, "熔断器启动2");
    }
}
